//
//  WWNetRequest.h
//  WWNetworkHelper
//
//  Created by swift on 2017/7/28.
//  Copyright © 2017年 王家伟. All rights reserved.
//

#import <Foundation/Foundation.h>

/*
 以下Block的参数你根据自己项目中的需求来指定, 这里仅仅是一个演示的例子
 */

/**
 请求成功的block
 
 @param response 响应体数据
 */
typedef void(^WWRequestSuccess)(id response);

/**
 请求失败的block
 
 @param error 失败信息 (因为之前项目用的就是字典, 所以这里就用字典不用NSError)
 */
typedef void(^WWRequestFailure)(NSDictionary *error);


/**
 网络请求业务处理层次
 */
@interface WWNetRequest : NSObject

// 登录
+ (NSURLSessionTask *)fetchLoginWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 首页
+ (NSURLSessionTask *)fetchHomeWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 城市列表
+ (NSURLSessionTask *)fetchCityListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 用户类型
+ (NSURLSessionTask *)fetchUserTypeWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 发送验证码
+ (NSURLSessionTask *)fetchVerificationCodeWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 注册
+ (NSURLSessionTask *)fetchRegisterWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 重置密码
+ (NSURLSessionTask *)fetchPasswordResetWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 商品详情页
+ (NSURLSessionTask *)fetchGoodsDetailWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 收藏商品
+ (NSURLSessionTask *)fetchAddCollectWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 取消收藏商品
+ (NSURLSessionTask *)fetchDeleteCollectWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 加入购物车
+ (NSURLSessionTask *)fetchAddCartWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
//// 购物车选中状态更新
//+ (NSURLSessionTask *)fetchUpdateShoppingCartStateWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 商品列表
+ (NSURLSessionTask *)fetchGoodsListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 订单预览 
+ (NSURLSessionTask *)fetchOrderInfoWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 生成订单 
+ (NSURLSessionTask *)fetchCreateOrderWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 图片上传
// 开店 
+ (NSURLSessionTask *)fetchOpenShopWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;

// 店铺列表 (首页店铺,搜索店铺都用这个)
+ (NSURLSessionTask *)fetchShopListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 我的流水 
+ (NSURLSessionTask *)fetchCklsListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 历史分红指数 
+ (NSURLSessionTask *)fetchFhzsListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 编辑银行卡
+ (NSURLSessionTask *)fetchEditBankCardWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 添加银行卡 
+ (NSURLSessionTask *)fetchAddBankCardWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 店铺分类(开店) kGetShopType; 分类列表也用这个
+ (NSURLSessionTask *)fetchShopTypeWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
 // 购物车列表 kCartList;
+ (NSURLSessionTask *)fetchCartListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 删除购物车 kDeleteCart;
+ (NSURLSessionTask *)fetchDeleteCartWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改商品数量 kModifyGoodsAmount;
+ (NSURLSessionTask *)fetchModifyGoodsAmountWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改商品选中状态
+ (NSURLSessionTask *)fetchModifyGoodsSelectedStateWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改商店选中状态
+ (NSURLSessionTask *)fetchModifyShopSelectedStateWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改购物车全选状态
+ (NSURLSessionTask *)fetchModifyShoppingCartAllStateWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 分类列表 kGetCategory;
+ (NSURLSessionTask *)fetchCategoryWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 附近商店 kGetNearShop;
+ (NSURLSessionTask *)fetchNearShopWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 城市选择接口 kAreacommit;
+ (NSURLSessionTask *)fetchAreacommitWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 店铺详情 kGetShopDetail;
+ (NSURLSessionTask *)fetchShopDetailWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 申请成为创客 kApplyForMake;
+ (NSURLSessionTask *)fetchApplyForMakeWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 退出登录 kLogout;
+ (NSURLSessionTask *)fetchLogoutWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改个人信息 kModifyProfile;
+ (NSURLSessionTask *)fetchModifyProfileWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 地址列表 ;
+ (NSURLSessionTask *)fetchAddressListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 删除地址
+ (NSURLSessionTask *)fetchDeleteAddressWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 设置为默认地址
+ (NSURLSessionTask *)fetchSetDefaultAddressWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 地址获取
+ (NSURLSessionTask *)fetchOneAddressWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 添加地址
+ (NSURLSessionTask *)fetchAddAddressWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改地址
+ (NSURLSessionTask *)fetchEditAddressWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 我的收益 kMyEarnings;
+ (NSURLSessionTask *)fetchMyEarningsWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 收款记录 kGetMyshopRecord;
+ (NSURLSessionTask *)fetchMyshopRecordWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
//用户付款记录
+ (NSURLSessionTask *)fetchUserRecordWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 提现 kSqtx;
+ (NSURLSessionTask *)fetchSqtxWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 提现记录 kSqtxList;
+ (NSURLSessionTask *)fetchSqtxListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 我的收藏 kGetCollectList;
+ (NSURLSessionTask *)fetchCollectListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 银行卡列表 kGetBankCard;
+ (NSURLSessionTask *)fetchBankCardWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 设置默认银行卡 kSetDefaultBankCard;
+ (NSURLSessionTask *)fetchSetDefaultBankCardWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 删除银行卡 kDeleteBankCard;
+ (NSURLSessionTask *)fetchDeleteBankCardWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 订单列表 kGetOrderList;
+ (NSURLSessionTask *)fetchOrderListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改密码  kChangePassword;
+ (NSURLSessionTask *)fetchChangePasswordWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 我的推荐人 kGetMyReferral;
+ (NSURLSessionTask *)fetchMyReferralWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 用户信息 kUserInfo;
+ (NSURLSessionTask *)fetchUserInfoWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 商户入驻;
+ (NSURLSessionTask *)fetchShopRegisterWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 我的足迹 (浏览记录)
+ (NSURLSessionTask *)fetchBrowseRecordsWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 获取物流单号
+ (NSURLSessionTask *)fetchLogisticsNumWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 获取物流信息
+ (NSURLSessionTask *)fetchLogisticsInfoWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 取消订单
+ (NSURLSessionTask *)fetchCancelOrderWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 删除订单
+ (NSURLSessionTask *)fetchDeleteOrderWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 积分专区
+ (NSURLSessionTask *)fetchIntegralAreaWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 商户订单查询
+ (NSURLSessionTask *)fetchShopkeeperOrderListWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;

+ (NSURLSessionTask *)fetchShopkeeperMessWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 线下支付订单(二维码支付)
+ (NSURLSessionTask *)fetchPayOffLineWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 线下支付订单(二维码支付) 先调用上面接口, 获取orderID,再调用这个获取订单支付信息
+ (NSURLSessionTask *)fetchPayOffLinePayTypeWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;


// 图片上传 : 开店&个人头像
+ (NSURLSessionTask *)fetchUploadImgWithParameters:(id)parameters imgArr:(NSArray *)imgArr success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;


// 订单支付
+ (NSURLSessionTask *)fetchPayOrderWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 确认收货
+ (NSURLSessionTask *)fetchConfirmOrderWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 修改支付宝账号
+ (NSURLSessionTask *)ModifyApayWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;

//推荐关系
+ (NSURLSessionTask *)fetchAppUserGetMakeWithUrl:(NSString *)url Parameters:(id)parameters  success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;

//订单的订单详情
+ (NSURLSessionTask *)fetchOrderDetailWithParameters:(id)parameters  success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;


//获取商户绑定账号
+ (NSURLSessionTask *)fetchOrderBindcardWithParameters:(id)parameters  success:(WWRequestSuccess)success failure:(WWRequestFailure)failure;
// 编辑店铺
+ (NSURLSessionTask *)fetchEditShopWithParameters:(id)parameters success:(WWRequestSuccess)success failure:(WWRequestFailure)failure ;

@end
